import React from 'react';

interface LeftSelectTestInter {
  // 子组件向父组件传参，调用父组件的方法，讲子组件的数据传出
  handleDataChange: (data: any) => any;
}

export default function LeftSelectTest(props: LeftSelectTestInter) {
  const a = ['牧场管理', '畜牧管理'];
  return (
    <div>
      <ul>
        {a.map((item) => (
          <li onClick={() => props.handleDataChange(item)} key={item}>
            {item}
          </li>
        ))}
      </ul>
    </div>
  );
}
